<!-- 修改数据页面 -->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">
$(function() {
	progressClose();
	
    $('#editForm').form({
        url : '${pageContext.request.contextPath}/info/pictures/edit',
        onSubmit : function() {
            progressLoad();
            var isValid = $(this).form('validate');
            if (!isValid) {
                progressClose();
            }
            return isValid;
        },
        success : function(result) {
            progressClose();
            result = $.parseJSON(result);
            if (result.success) {
            	parent.$.messager.alert('提示', result.msg, 'info');
                parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为list.jsp页面预定义好了
                parent.$.modalDialog.handler.dialog('close');
            } else {
                parent.$.messager.alert('错误', result.msg, 'error');
            }
        }
    });
});
</script>
<div class="easyui-layout" data-options="fit:true,border:false" >
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 3px;" >
        <form id="editForm" method="post" >
        	<input name="id" type="hidden"  value="${entity.id}">
            <table class="grid">
            	<tr>
		            <td>图片</td>
		            <td>
		            	<img src="${pageContext.request.contextPath }/${entity.picPath}" width="200" height="200">
		            </td>
		        </tr>
				<tr>
		            <td>标题</td>
		            <td><input name="title" type="text" placeholder="请输入标题" 
		            	class="easyui-validatebox" data-options="required:true" 
		            	value="${entity.title}"></td>
		        </tr>
				<tr>
		            <td>文件名</td>
		            <td><input name="picName" type="text" placeholder="请输入文件名" 
		            	class="easyui-validatebox" data-options="required:true" 
		            	value="${entity.picName}"></td>
		        </tr>
				<tr>
		            <td>备注</td>
		            <td><input name="remark" type="text" placeholder="请输入备注" 
		            	class="easyui-validatebox" data-options="required:true" 
		            	value="${entity.remark}"></td>
		        </tr>
            </table>
        </form>
    </div>
</div>
